if [ $1 ]
then
	rootPath=$1
	cd ECUI
else
	rootPath=`pwd`
	cd ../ECUI
fi

lastlog=`git log -1`
branchlog=`git branch -a`
time=$(date "+%Y-%m-%d %H:%M:%S")

cd $rootPath
projectlastlog=`git log -1`
projectbranchlog=`git branch -a`

logStr=`cat <<eeooff
=====================================================================
/*** ecui-log-begin ***/

		# 发布时间: $time

### ECUI 版本
# 命令: git branch -a
$branchlog

# 命令: git log -1
$lastlog

### project 版本
# 命令: git branch -a
$projectlastlog

# 命令: git log -1
$projectbranchlog


/*** ecui-log-end ***/
=====================================================================
eeooff
`
echo "$logStr" >> $rootPath/version.log
# template=`cat .create-template.js`
# jsStr=${template%%\/\*\*\*route.js-end\*\*\*\/*}
# jsStr=${jsStr##*/\*\*\*route.js-begin\*\*\*/}
# jsStr=${jsStr//\{route\}/$2} 